package com.qifenqian.turbot.module.contract

import com.qifenqian.turbot.module.entity.request.ServiceRequest
import com.qifenqian.turbot.module.entity.response.restaurant.RestaurantServiceEntity
import com.qifenqian.turbot.net.ModelCallback

/**
 * @author H
 * @createTime 2018/12/26 15:48
 * @description
 * @see
 * @since
 */
interface RestaurantServiceContract {

    interface Model { ;
        /**
         * 获取服务列表
         */
        fun getServiceList(callback: ModelCallback<List<RestaurantServiceEntity>>)

        /**
         * 添加服务
         */
        fun addService(serviceName: String, callback: ModelCallback<RestaurantServiceEntity>)

        /**
         * 删除服务
         */
        fun deleteService(serviceId: Int, callback: ModelCallback<Nothing>)

        /**
         * 选择服务
         */
        fun chooseService(request: ServiceRequest, callback: ModelCallback<Nothing>)
    }

    interface View {
        fun getServiceListResult(isSuccess: Boolean, code: Int = 0, msg: String?, restaurantServiceEntities: List<RestaurantServiceEntity>? = null)

        fun addServiceResult(isSuccess: Boolean, code: Int = 0, msg: String?, restaurantServiceEntity: RestaurantServiceEntity? = null, serviceName: String = "")

        fun deleteServiceResult(isSuccess: Boolean, code: Int = 0, msg: String?)

        fun chooseServiceResult(isSuccess: Boolean, code: Int = 0, msg: String?)
    }

    interface Presenter {
        fun getServiceList()

        fun addService(serviceName: String)

        fun deleteService(serviceId: Int)

        fun chooseService(request: ServiceRequest)
    }
}
